from .models import *
from rest_framework import serializers


class CreateService(serializers.ModelSerializer):

    class Meta:
        models = Classification
        fields = '__all__'


class TabService(serializers.ModelSerializer):

    ta_name = serializers.SerializerMethodField()

    def get_ta_name(self, obj):
        return obj.classifica.name

    class Meta:
        models = Table
        fields = '__all__'


